﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MvcShop.Models.Repositories
{
    public interface IRepository<T>
    {
        void Add(T entity);
        void Del(T entity);
        void Del(ICriteria criteria);
        void Update(int entityId, T entity);
        T Find(int entityId);
        IList<T> Find(ICriteria criteria);
        IList<T> FindAll();
        IList<T> Find(ICriteria criteria, int pageIndex, int pageSize, Order orderExpr);
        IQueryable<T> FindQueryable(ICriteria criteria, int page, int pageSize, Order orderExpr);
        int Count(ICriteria criteria);
        void SaveChanges();
        void AcceptAllChanges();
    }
}
